﻿/*----------------------------------------------------------------
//文件功能描述：商品评价对象。
//创建人：赵国伟
//创建时间：2012-03-18 13:49:54
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shopping.Common;

namespace Shopping.Model
{
    public class GoodsEvaluateInfo
    {
        /// <summary>
        /// 评价基本信息；
        /// </summary>
        public GoodsEvaluates Evaluate;

        /// <summary>
        /// 会员名称；
        /// </summary>
        public string UserName;

        /// <summary>
        /// 商品名称；
        /// </summary>
        public string GoodsName;


        public string StarImgsHtml
        {
            get
            {
                if (Evaluate == null)
                    return "";
                StringBuilder sb = new StringBuilder();
                for (int i = 1; i <= Evaluate.EvaluateScores; ++i)
                    sb.Append(" <img src=\"/Manage/Images/Start1.png\" />");
                for(int i = 5-Evaluate.EvaluateScores;i>0;--i)
                    sb.Append(" <img src=\"/Manage/Images/Start2.png\" />");
                return sb.ToString();

            }
        }


    }
}
